<?php 
/***
    Amrita ITEWS - Copyright (C) 2009 Amrita Vishwa Vidyapeetham, Amritapuri.
                                     (http://www.amrita.edu)
    ***************************************************************************
    This file is part of the Amrita ITEWS distribution.
    Amrita ITEWS is free software; you can redistribute it and/or modify it 
    under the terms of the GNU General Public License (version 2) as published 
    by the Free Software Foundation AND MODIFIED BY the Amrita ITEWS exception.
    ***NOTE*** The exception to the GPL is included to allow you to distribute
    a combined work that includes Amrita ITEWS without being obliged to provide
    the source code for proprietary components outside of the Amrita ITEWS
    software. Amrita ITEWS is distributed in the hope that it will be useful, 
    but WITHOUT ANY WARRANTY; without even the implied warranty of 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
    Public License for more details. You should have received a copy of the GNU
    General Public License and the Amrita ITEWS license exception along with 
    Amrita ITEWS if not then it can be viewed here: 
    http://itews.amrita.ac.in/license.html.
    
    Documentation, latest information, license and contact details are at:
    http://itews.amrita.ac.in/
 
    Amrita ITEWS source code can be found at:
    http://code.google.com/p/itews"; 
    
    The initial code-base of Amrita ITEWS was developed by Amrita Vishwa 
    Vidyapeetham as part of the project titled,\"Intelligent & Interactive 
    Telematics using Emerging Wireless Technologies for Transport Systems 
    (ITEWS)\" sponsored by Technology Information Forecasting and Assessment 
    Council (TIFAC), India.
***/
?><?php

//System-test value - 2
//Unit-test value - 2
//Used by - Download Wroker script
//Purpose: for wget downloads
define("MAX_RETRIES", 2);//

//System-test value - 5
//Unit-test value - 5
//Used by - Downlaod Worker script
//Purpose: for wget downloads
define("DOWNLOAD_TIMEOUT", 5);

//System-test value - 60
//Unit-test value - 60
//Used by - Hotzone Detector script
//Purpose: socket timeout for Hotzone scan - in seconds
define("HZSCAN_TIMEOUT", 60);

//System-test value - 10
//Unit-test value - 10
//Used by - Media Downloader script
//Purpose: No. of seconds beyond which hotzone event is labelled as stale
define("HOTZONE_EVENT_TIMEOUT",10);//used by Media Downloader script


//System-test value - 10
//Unit-test value - 99999999 (large value so that one can be simulate to be in hotzone for long time
//Used by - Hotzone Detector script
//Purpose: To check whether the entry in the table for current node is stale or not
define("CURR_NODE_EVENT_TIMEOUT",10);

//System-test value - 5
//Unit-test value - 5
//Used by - driver.php
//Purpose: connection timeout while connecting to OSGI TCP socket for route change notification
define("OSGI_CONNECTION_TIMEOUT",5);//

//System-test value - true
//Unit-test value - true 
//Used by - download worker script
//Purpose: parameter for wget - currently this option is hardcoded in the command
//define("RETRY_WHEN_CONN_REFUSED", true);

//System-test value - /home/arl/iv_media_cache/media_files
//Unit-test value - /home/arl/iv_media_cache/media_files
//Used by - download worker script
//Purpose: Root folder for storing all the downloaded media files
define("MEDIA_FILE_ROOT_FOLDER",'/home/arl/iv_media_cache/media_files');

//System-test value - /etc/telematics/ivtu_ip
//Unit-test value - /etc/telematics/ivtu_ip
//Used by - hotzone detector script
//Purpose: location of the file that contains the IPAddress or IPAddress:PortNumber of IVTU
define("IVTU_IP_ADDR_FILE",'/etc/telematics/ivtu_ip');

//System-test value - e.g gvia_interface_sw/hzinfo.php?attrs=hmcache
//Unit-test value - e.g hzinfo.php?attrs=hmcache
//Used by - hotzone detector script 
//Purpose: connection timeout while connecting to OSGI TCP socket for route change notification
define("HZINFO_URL",'gvia_interface_sw/hzinfo.php?attrs=hmcache');

//System-test value - NOHZN,NOSUP
//Unit-test value - NOHZN,NOSUP
//Used by - hotzone detector script
//Purpose: Values returned if hotzone is unavailable
define("UNAVAILABLE_HZINFO_RETURN_VALUES",'NOHZN,NOSUP');

//System-test value - eng
//Unit-test value - eng
//Used by - station_info.php, webticker_xml.php
//Purpose: default language for driver interface - other values are hin, mal, tam
define("DEFAULT_LANG_FOR_DRIVER_INTERFACE",'eng');//

//System-test value - eng
//Unit-test value - eng
//Used by - driver.php, webticker_xml.php
//Purpose: default language for passenger interface - other values are hin, mal, tam
define("DEFAULT_LANG_FOR_PASSENGER_INTERFACE",'eng');

//System-test value - 1
//Unit-test value - 1
//Used by - media downloader, download worker, hotzone detector
//Purpose: 1 second sleep
define("I_SLEEP_TIME",1);

//System-test value - 3
//Unit-test value - 3
//Used by - media downloader, download worker, hotzone detector
//Purpose: 3 seconds sleep
define("III_SLEEP_TIME",3);


//System-test value - 10
//Unit-test value - 10
//Used by - media garbage collector
//Purpose: 10 seconds sleepi for Media Garbage Collection
define("GARBAGE_COLLECTOR_SLEEP",10);


//System-test value - 5
//Unit-test value - 5
//Used by - media downloader, download worker, hotzone detector
//Purpose: 5 seconds sleep
define("V_SLEEP_TIME",5);

//System-test value - 1800
//Unit-test value - 1800
//Used by - driver.php
//Purpose: port number for OSGI connection, when changing route
define('OSGI_TCP_PORT',1800);

//System-test value - 5
//Unit-test value - 5
//Used by - download_worker.php
//Purpose: No. of seconds between each read of wget output from popen command
define("CHECK_THRESHOLD_SECS",5);

//TO BE CHANGED...Value of 5 would be ideal, but for testing 99999999 or a large 
//number can be used if you want to check download status for downloads which are stale
//System-test value - 10
//Unit-test value - 10 or 99999999 
//Used by - driver.php
//Purpose: No. of seconds considered for download to be labelled as currently ongoing
define("LAST_DOWNLOAD_TIME_THRESHOLD_SECS",10);

//System-test value - 20
//Unit-test value - 20 or 100000000 
//Used by - driver.php
//Purpose: No. of seconds considered for download status to be labelled as stale
define("DOWNLOAD_STATUS_TIME_THRESHOLD_SECS",20);

//System-test value - true
//Unit-test value - true
//Used by - utils.php.inc
//Purpose: set to false when not debugging, otherwise all log will be printed on screen/log file
define("DBG_ENBLD",true);//set to false when not debugging, otherwise all log will be printed on screen

//System-test value - true
//Unit-test value - true
//Used by - media downloader, download worker
//Purpose: when true, the system will beep as per the beeps scpecified below in BEEPS section, otherwise not
//define("BEEP_ENABLED",false);
define("BEEP_ENABLED",false);

//define("AUTO_PILOT",false);
define("AUTO_PILOT",true);

//System-test value - \x07
//Unit-test value - \x07
//Used by - download worker
//Purpose: beep if downloads are going on
//define("CURRENTLY_DOWNLOADING_BEEP","\x07");
define("CURRENTLY_DOWNLOADING_BEEP",'play /usr/share/sounds/KDE_Notify.wav');

//System-test value - \x07\x07\x07\x07\x07
//Unit-test value - \x07\x07\x07\x07\x07
//Used by - download worker
//Purpose: beep if netwrok error
//define("NETWORK_ERROR_BEEP","\x07\x07\x07\x07\x07");
define("NETWORK_ERROR_BEEP",'play /usr/share/sounds/KDE_Dialog_Disappear.wav');

//System-test value - \x07\x07\x07
//Unit-test value - \x07\x07\x07
//Used by - media downloader
//Purpose: beep if nothing to download
//define("NOTHING_TO_DOWNLOAD_BEEP","\x07\x07\x07");
define("NOTHING_TO_DOWNLOAD_BEEP",'play /usr/share/sounds/gaim/receive.wav');

//System-test value - \x07\x07\x07\x07\x07
//Unit-test value - \x07\x07\x07\x07\x07
//Used by - media downloader
//Purpose: beep if file not found
//define("NOT_FOUND_BEEP","\x07\x07\x07\x07\x07");
define("NOT_FOUND_BEEP",'play /usr/share/sounds/KDE_Error_1.ogg');

//Database connection parameters
$dbname="gvia_db";
$dbtype="mysql";
$dbuser="root";
$dbpass="";
?>
